ruby:
  form_url = params[:action] == 'new' ? app_schemes_path : app_scheme_path(@scheme.app, @scheme)

.col-md-12
  .card
    .card-header
      h3.card-title
        = @title
      .card-tools
        a href="#{app_path(@app)}"
          i.far.fa-list-alt
          |  返回应用
    .card-body
      = simple_form_for(@scheme, url: form_url) do |f|
        = f.error_notification

        = f.input :name, required: true
        - if params[:action] == 'new'
          = f.input :channel, collection: default_channels, label_method: :name, value_method: :value, selected: 0
        = f.button :submit
